Optimal. Leaf size=976 \[ -\frac {\sqrt {a^2+b^2+c \left (c+\sqrt {a^2+b^2-2 a c+c^2}\right )-a \left (2 c+\sqrt {a^2+b^2-2 a c+c^2}\right )} \text {ArcTan}\left (\frac {b^2+(a-c) \left (a-c-\sqrt {a^2+b^2-2 a c+c^2}\right )-b \sqrt {a^2+b^2-2 a c+c^2} \cot (d+e x)}{\sqrt {2} \sqrt [4]{a^2+b^2-2 a c+c^2} \sqrt {a^2+b^2+c \left (c+\sqrt {a^2+b^2-2 a c+c^2}\right )-a \left (2 c+\sqrt {a^2+b^2-2 a c+c^2}\right )} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{\sqrt {2} \sqrt [4]{a^2+b^2-2 a c+c^2} e}-\frac {b \tanh ^{-1}\left (\frac {b+2 c \cot (d+e x)}{2 \sqrt {c} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{2 \sqrt {c} e}+\frac {b \left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac {b+2 c \cot (d+e x)}{2 \sqrt {c} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{16 c^{5/2} e}-\frac {b \left (7 b^2-12 a c\right ) \left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac {b+2 c \cot (d+e x)}{2 \sqrt {c} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{256 c^{9/2} e}+\frac {\sqrt {a^2+b^2+c \left (c-\sqrt {a^2+b^2-2 a c+c^2}\right )-a \left (2 c-\sqrt {a^2+b^2-2 a c+c^2}\right )} \tanh ^{-1}\left (\frac {b^2+(a-c) \left (a-c+\sqrt {a^2+b^2-2 a c+c^2}\right )+b \sqrt {a^2+b^2-2 a c+c^2} \cot (d+e x)}{\sqrt {2} \sqrt [4]{a^2+b^2-2 a c+c^2} \sqrt {a^2+b^2+c \left (c-\sqrt {a^2+b^2-2 a c+c^2}\right )-a \left (2 c-\sqrt {a^2+b^2-2 a c+c^2}\right )} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{\sqrt {2} \sqrt [4]{a^2+b^2-2 a c+c^2} e}-\frac {\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{e}-\frac {b (b+2 c \cot (d+e x)) \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{8 c^2 e}+\frac {b \left (7 b^2-12 a c\right ) (b+2 c \cot (d+e x)) \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{128 c^4 e}+\frac {\left (a+b \cot (d+e x)+c \cot ^2(d+e x)\right )^{3/2}}{3 c e}-\frac {\cot ^2(d+e x) \left (a+b \cot (d+e x)+c \cot ^2(d+e x)\right )^{3/2}}{5 c e}-\frac {\left (35 b^2-32 a c-42 b c \cot (d+e x)\right ) \left (a+b \cot (d+e x)+c \cot ^2(d+e x)\right )^{3/2}}{240 c^3 e} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 23.56, antiderivative size = 976, normalized size of antiderivative = 1.00, number
of steps used = 21, number of rules used = 14, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.424, Rules
used = {3782, 6857, 654, 626, 635, 212, 756, 793, 1035, 1092, 1050, 1044, 214, 211}
\begin {gather*} -\frac {\left (c \cot ^2(d+e x)+b \cot (d+e x)+a\right )^{3/2} \cot ^2(d+e x)}{5 c e}-\frac {\left (35 b^2-42 c \cot (d+e x) b-32 a c\right ) \left (c \cot ^2(d+e x)+b \cot (d+e x)+a\right )^{3/2}}{240 c^3 e}+\frac {\left (c \cot ^2(d+e x)+b \cot (d+e x)+a\right )^{3/2}}{3 c e}-\frac {\sqrt {a^2-\left (2 c+\sqrt {a^2-2 c a+b^2+c^2}\right ) a+b^2+c \left (c+\sqrt {a^2-2 c a+b^2+c^2}\right )} \text {ArcTan}\left (\frac {b^2-\sqrt {a^2-2 c a+b^2+c^2} \cot (d+e x) b+(a-c) \left (a-c-\sqrt {a^2-2 c a+b^2+c^2}\right )}{\sqrt {2} \sqrt [4]{a^2-2 c a+b^2+c^2} \sqrt {a^2-\left (2 c+\sqrt {a^2-2 c a+b^2+c^2}\right ) a+b^2+c \left (c+\sqrt {a^2-2 c a+b^2+c^2}\right )} \sqrt {c \cot ^2(d+e x)+b \cot (d+e x)+a}}\right )}{\sqrt {2} \sqrt [4]{a^2-2 c a+b^2+c^2} e}-\frac {b \left (7 b^2-12 a c\right ) \left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac {b+2 c \cot (d+e x)}{2 \sqrt {c} \sqrt {c \cot ^2(d+e x)+b \cot (d+e x)+a}}\right )}{256 c^{9/2} e}+\frac {b \left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac {b+2 c \cot (d+e x)}{2 \sqrt {c} \sqrt {c \cot ^2(d+e x)+b \cot (d+e x)+a}}\right )}{16 c^{5/2} e}-\frac {b \tanh ^{-1}\left (\frac {b+2 c \cot (d+e x)}{2 \sqrt {c} \sqrt {c \cot ^2(d+e x)+b \cot (d+e x)+a}}\right )}{2 \sqrt {c} e}+\frac {\sqrt {a^2-\left (2 c-\sqrt {a^2-2 c a+b^2+c^2}\right ) a+b^2+c \left (c-\sqrt {a^2-2 c a+b^2+c^2}\right )} \tanh ^{-1}\left (\frac {b^2+\sqrt {a^2-2 c a+b^2+c^2} \cot (d+e x) b+(a-c) \left (a-c+\sqrt {a^2-2 c a+b^2+c^2}\right )}{\sqrt {2} \sqrt [4]{a^2-2 c a+b^2+c^2} \sqrt {a^2-\left (2 c-\sqrt {a^2-2 c a+b^2+c^2}\right ) a+b^2+c \left (c-\sqrt {a^2-2 c a+b^2+c^2}\right )} \sqrt {c \cot ^2(d+e x)+b \cot (d+e x)+a}}\right )}{\sqrt {2} \sqrt [4]{a^2-2 c a+b^2+c^2} e}+\frac {b \left (7 b^2-12 a c\right ) (b+2 c \cot (d+e x)) \sqrt {c \cot ^2(d+e x)+b \cot (d+e x)+a}}{128 c^4 e}-\frac {b (b+2 c \cot (d+e x)) \sqrt {c \cot ^2(d+e x)+b \cot (d+e x)+a}}{8 c^2 e}-\frac {\sqrt {c \cot ^2(d+e x)+b \cot (d+e x)+a}}{e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 212
Rule 214
Rule 626
Rule 635
Rule 654
Rule 756
Rule 793
Rule 1035
Rule 1044
Rule 1050
Rule 1092
Rule 3782
Rule 6857
Rubi steps
\begin {align*} \int \cot ^5(d+e x) \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)} \, dx &=-\frac {\text {Subst}\left (\int \frac {x^5 \sqrt {a+b x+c x^2}}{1+x^2} \, dx,x,\cot (d+e x)\right )}{e}\\ &=-\frac {\text {Subst}\left (\int \left (-x \sqrt {a+b x+c x^2}+x^3 \sqrt {a+b x+c x^2}+\frac {x \sqrt {a+b x+c x^2}}{1+x^2}\right ) \, dx,x,\cot (d+e x)\right )}{e}\\ &=\frac {\text {Subst}\left (\int x \sqrt {a+b x+c x^2} \, dx,x,\cot (d+e x)\right )}{e}-\frac {\text {Subst}\left (\int x^3 \sqrt {a+b x+c x^2} \, dx,x,\cot (d+e x)\right )}{e}-\frac {\text {Subst}\left (\int \frac {x \sqrt {a+b x+c x^2}}{1+x^2} \, dx,x,\cot (d+e x)\right )}{e}\\ &=-\frac {\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{e}+\frac {\left (a+b \cot (d+e x)+c \cot ^2(d+e x)\right )^{3/2}}{3 c e}-\frac {\cot ^2(d+e x) \left (a+b \cot (d+e x)+c \cot ^2(d+e x)\right )^{3/2}}{5 c e}+\frac {\text {Subst}\left (\int \frac {\frac {b}{2}-(a-c) x-\frac {b x^2}{2}}{\left (1+x^2\right ) \sqrt {a+b x+c x^2}} \, dx,x,\cot (d+e x)\right )}{e}-\frac {\text {Subst}\left (\int x \left (-2 a-\frac {7 b x}{2}\right ) \sqrt {a+b x+c x^2} \, dx,x,\cot (d+e x)\right )}{5 c e}-\frac {b \text {Subst}\left (\int \sqrt {a+b x+c x^2} \, dx,x,\cot (d+e x)\right )}{2 c e}\\ &=-\frac {\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{e}-\frac {b (b+2 c \cot (d+e x)) \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{8 c^2 e}+\frac {\left (a+b \cot (d+e x)+c \cot ^2(d+e x)\right )^{3/2}}{3 c e}-\frac {\cot ^2(d+e x) \left (a+b \cot (d+e x)+c \cot ^2(d+e x)\right )^{3/2}}{5 c e}-\frac {\left (35 b^2-32 a c-42 b c \cot (d+e x)\right ) \left (a+b \cot (d+e x)+c \cot ^2(d+e x)\right )^{3/2}}{240 c^3 e}+\frac {\text {Subst}\left (\int \frac {b+(-a+c) x}{\left (1+x^2\right ) \sqrt {a+b x+c x^2}} \, dx,x,\cot (d+e x)\right )}{e}-\frac {b \text {Subst}\left (\int \frac {1}{\sqrt {a+b x+c x^2}} \, dx,x,\cot (d+e x)\right )}{2 e}+\frac {\left (b \left (7 b^2-12 a c\right )\right ) \text {Subst}\left (\int \sqrt {a+b x+c x^2} \, dx,x,\cot (d+e x)\right )}{32 c^3 e}+\frac {\left (b \left (b^2-4 a c\right )\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+b x+c x^2}} \, dx,x,\cot (d+e x)\right )}{16 c^2 e}\\ &=-\frac {\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{e}-\frac {b (b+2 c \cot (d+e x)) \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{8 c^2 e}+\frac {b \left (7 b^2-12 a c\right ) (b+2 c \cot (d+e x)) \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{128 c^4 e}+\frac {\left (a+b \cot (d+e x)+c \cot ^2(d+e x)\right )^{3/2}}{3 c e}-\frac {\cot ^2(d+e x) \left (a+b \cot (d+e x)+c \cot ^2(d+e x)\right )^{3/2}}{5 c e}-\frac {\left (35 b^2-32 a c-42 b c \cot (d+e x)\right ) \left (a+b \cot (d+e x)+c \cot ^2(d+e x)\right )^{3/2}}{240 c^3 e}-\frac {b \text {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {b+2 c \cot (d+e x)}{\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{e}+\frac {\left (b \left (b^2-4 a c\right )\right ) \text {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {b+2 c \cot (d+e x)}{\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{8 c^2 e}-\frac {\left (b \left (7 b^2-12 a c\right ) \left (b^2-4 a c\right )\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+b x+c x^2}} \, dx,x,\cot (d+e x)\right )}{256 c^4 e}-\frac {\text {Subst}\left (\int \frac {-b \sqrt {a^2+b^2-2 a c+c^2}+\left (-b^2-(a-c) \left (a-c-\sqrt {a^2+b^2-2 a c+c^2}\right )\right ) x}{\left (1+x^2\right ) \sqrt {a+b x+c x^2}} \, dx,x,\cot (d+e x)\right )}{2 \sqrt {a^2+b^2-2 a c+c^2} e}+\frac {\text {Subst}\left (\int \frac {b \sqrt {a^2+b^2-2 a c+c^2}+\left (-b^2-(a-c) \left (a-c+\sqrt {a^2+b^2-2 a c+c^2}\right )\right ) x}{\left (1+x^2\right ) \sqrt {a+b x+c x^2}} \, dx,x,\cot (d+e x)\right )}{2 \sqrt {a^2+b^2-2 a c+c^2} e}\\ &=-\frac {b \tanh ^{-1}\left (\frac {b+2 c \cot (d+e x)}{2 \sqrt {c} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{2 \sqrt {c} e}+\frac {b \left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac {b+2 c \cot (d+e x)}{2 \sqrt {c} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{16 c^{5/2} e}-\frac {\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{e}-\frac {b (b+2 c \cot (d+e x)) \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{8 c^2 e}+\frac {b \left (7 b^2-12 a c\right ) (b+2 c \cot (d+e x)) \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{128 c^4 e}+\frac {\left (a+b \cot (d+e x)+c \cot ^2(d+e x)\right )^{3/2}}{3 c e}-\frac {\cot ^2(d+e x) \left (a+b \cot (d+e x)+c \cot ^2(d+e x)\right )^{3/2}}{5 c e}-\frac {\left (35 b^2-32 a c-42 b c \cot (d+e x)\right ) \left (a+b \cot (d+e x)+c \cot ^2(d+e x)\right )^{3/2}}{240 c^3 e}-\frac {\left (b \left (7 b^2-12 a c\right ) \left (b^2-4 a c\right )\right ) \text {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {b+2 c \cot (d+e x)}{\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{128 c^4 e}+\frac {\left (b \left (b^2+(a-c) \left (a-c-\sqrt {a^2+b^2-2 a c+c^2}\right )\right )\right ) \text {Subst}\left (\int \frac {1}{2 b \sqrt {a^2+b^2-2 a c+c^2} \left (b^2+(a-c) \left (a-c-\sqrt {a^2+b^2-2 a c+c^2}\right )\right )+b x^2} \, dx,x,\frac {-b^2-(a-c) \left (a-c-\sqrt {a^2+b^2-2 a c+c^2}\right )+b \sqrt {a^2+b^2-2 a c+c^2} \cot (d+e x)}{\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{e}+\frac {\left (b \left (b^2+(a-c) \left (a-c+\sqrt {a^2+b^2-2 a c+c^2}\right )\right )\right ) \text {Subst}\left (\int \frac {1}{-2 b \sqrt {a^2+b^2-2 a c+c^2} \left (b^2+(a-c) \left (a-c+\sqrt {a^2+b^2-2 a c+c^2}\right )\right )+b x^2} \, dx,x,\frac {-b^2-(a-c) \left (a-c+\sqrt {a^2+b^2-2 a c+c^2}\right )-b \sqrt {a^2+b^2-2 a c+c^2} \cot (d+e x)}{\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{e}\\ &=-\frac {\sqrt {a^2+b^2+c \left (c+\sqrt {a^2+b^2-2 a c+c^2}\right )-a \left (2 c+\sqrt {a^2+b^2-2 a c+c^2}\right )} \tan ^{-1}\left (\frac {b^2+(a-c) \left (a-c-\sqrt {a^2+b^2-2 a c+c^2}\right )-b \sqrt {a^2+b^2-2 a c+c^2} \cot (d+e x)}{\sqrt {2} \sqrt [4]{a^2+b^2-2 a c+c^2} \sqrt {a^2+b^2+c \left (c+\sqrt {a^2+b^2-2 a c+c^2}\right )-a \left (2 c+\sqrt {a^2+b^2-2 a c+c^2}\right )} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{\sqrt {2} \sqrt [4]{a^2+b^2-2 a c+c^2} e}-\frac {b \tanh ^{-1}\left (\frac {b+2 c \cot (d+e x)}{2 \sqrt {c} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{2 \sqrt {c} e}+\frac {b \left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac {b+2 c \cot (d+e x)}{2 \sqrt {c} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{16 c^{5/2} e}-\frac {b \left (7 b^2-12 a c\right ) \left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac {b+2 c \cot (d+e x)}{2 \sqrt {c} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{256 c^{9/2} e}+\frac {\sqrt {a^2+b^2+c \left (c-\sqrt {a^2+b^2-2 a c+c^2}\right )-a \left (2 c-\sqrt {a^2+b^2-2 a c+c^2}\right )} \tanh ^{-1}\left (\frac {b^2+(a-c) \left (a-c+\sqrt {a^2+b^2-2 a c+c^2}\right )+b \sqrt {a^2+b^2-2 a c+c^2} \cot (d+e x)}{\sqrt {2} \sqrt [4]{a^2+b^2-2 a c+c^2} \sqrt {a^2+b^2+c \left (c-\sqrt {a^2+b^2-2 a c+c^2}\right )-a \left (2 c-\sqrt {a^2+b^2-2 a c+c^2}\right )} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{\sqrt {2} \sqrt [4]{a^2+b^2-2 a c+c^2} e}-\frac {\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{e}-\frac {b (b+2 c \cot (d+e x)) \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{8 c^2 e}+\frac {b \left (7 b^2-12 a c\right ) (b+2 c \cot (d+e x)) \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{128 c^4 e}+\frac {\left (a+b \cot (d+e x)+c \cot ^2(d+e x)\right )^{3/2}}{3 c e}-\frac {\cot ^2(d+e x) \left (a+b \cot (d+e x)+c \cot ^2(d+e x)\right )^{3/2}}{5 c e}-\frac {\left (35 b^2-32 a c-42 b c \cot (d+e x)\right ) \left (a+b \cot (d+e x)+c \cot ^2(d+e x)\right )^{3/2}}{240 c^3 e}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 43.03, size = 4224, normalized size = 4.33 \begin {gather*} \text {Result too large to show} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] result has leaf size over 500,000. Avoiding possible recursion issues.
time = 0.77, size = 17768513, normalized size = 18205.44 \[\text {output too large to display}\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a + b \cot {\left (d + e x \right )} + c \cot ^{2}{\left (d + e x \right )}} \cot ^{5}{\left (d + e x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F(-1)]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \text {Hanged} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________